package cn.edu.service.impl;

import cn.edu.dao.CollectionDao;
import cn.edu.dao.impl.CollectionDaoImpl;
import cn.edu.pojo.Collection;
import cn.edu.service.CollectionService;

import java.util.List;

public class CollectionServiceImpl implements CollectionService {
    CollectionDao collectionDao = new CollectionDaoImpl();
    @Override
    public int addCollection(Collection collection) {
        return collectionDao.addCollection(collection);
    }

    @Override
    public int deleteCollection(String sn) {
        return collectionDao.deleteCollectionbySn(sn);
    }

    @Override
    public List<Collection> allCollection(String sno) {
        return collectionDao.queryCollection(sno);
    }
}
